#include "Common.fxh"

cbuffer cbPerObject
{
	float4x4 gWVP;
	float3 gColor;
};

struct VS_IN
{
	float3 posL     : POSITION;
};

struct VS_OUT
{
	float4 posD         : SV_POSITION;
};

VS_OUT VS(VS_IN vIn)
{
	VS_OUT vOut;

	vOut.posD = mul(float4(vIn.posL, 1.0f), gWVP);

	return vOut;
}

float4 PS(VS_OUT pIn) : SV_Target
{
	return float4(gColor, 1.0f);
}

technique11 tech
{
	pass P0
	{
		SetVertexShader( CompileShader( vs_5_0, VS() ) );
		SetGeometryShader( NULL );
		SetPixelShader( CompileShader( ps_5_0, PS() ) );
		
		SetDepthStencilState(DepthOn, 0);
		SetBlendState( NoBlend, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF );
		SetRasterizerState(Wireframe);
	}
}
